<?php
	include_once('../vendor/autoload.php');

    $loader = new \Twig\Loader\FilesystemLoader('templates');
    $twig = new \Twig\Environment($loader, [
        'cache' => 'compilation_cache',
        'auto_reload' => true,  //根据文件更新时间，自动更新缓存
        'debug' => true
    ]);

    $rand = rand(1,9);
    echo $twig->render('index.html', [
        'name' => '测试'.$rand,
        'tb' => array(
            array('table_name'=>'1','table_comment'=>'1')
        )
    ]);
?>